#ifndef TYPES_H
#define TYPES_H

#include "Export.h"
#include <sstream>

enum E_SUBJECT { UNKNOWN = -1, TRACES = 0, EVENTS = 1, ABSTRACT_EVENTS = 2, ACTIONS = 3, COMMANDS = 4, METADATA = 5 };

enum E_STATUS { UNDEFINED = -1, PENDING = 0, DELIVERED = 1, ACKNOWLEDGED = 2, EXPIRED = 3, OK = 4, DELETED = 5 };

namespace infobus {
  namespace types {

    class INFOBUS_API Message
    {
    public:
      Message();
      void setDummyData();
      Message(const Message * pOther);
      Message(long lId, E_STATUS status, E_SUBJECT subject, const char* pszSender, const char* pszMsg = NULL);
      void setMessage(const char* pszMsg);
      void setTimestamp(const char* pszTs);

      const char* getMessage() { return szMessage; };
      const char* getSender() { return szSender; };
      long getId() { return id; };
      E_STATUS getStatus() { return status; };
      E_SUBJECT getSubject() { return subject; };

      std::stringstream& operator<<(std::stringstream &ss);

    private:
      long id;
      E_STATUS status;
      E_SUBJECT subject;
      char szSender[256];
      char szMessage[4000];
      char szTimestamp[256];
    };
  };
};

#endif
